#include <iostream>
#include <sstream>
#include <string>
using namespace std;

#include "Arguments.hh"

Arguments::Arguments(int argc, char **argv){
  schedule = "";
  bitext = "";
  testset = "";

  char *p_option_name = NULL;
  for(int i = 1; i < argc; i++){
    if(argv[i][0] == '-'){
      p_option_name = &argv[i][1];
    }else{
      if(p_option_name == NULL){
	cerr << "option not specified!" << endl;
	exit(1);
      }else if(string("bitext") == p_option_name){
	bitext = argv[i];
      }else if(string("schedule") == p_option_name){
	schedule = argv[i];
      }else if(string("testset") == p_option_name){
	testset = argv[i];
      }else{
	cerr << "unknown option (" << p_option_name << ")!" << endl;
	exit(1);
      }
    }
  }
}

void Arguments::dump(){
  cerr
    << "schedule: " << schedule << endl
    << "bitext:   " << bitext << endl
    << "testset:  " << testset << endl;        
}
